home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2000 March / MacHome CD (March 2000).iso / pc / Education / Gradekeeper 5.1.sea / Gradekeeper 5.1 / Gradekeeper.rsrc / TEXT_128_Web site index page.txt < prev    next >
Text File  |  2000-01-09  |  3KB  |  144 lines

  1. <HTML>
  2. <HEAD>
  3.  
  4. <TITLE>
  5. Gradebook
  6. </TITLE>
  7.  
  8. <SCRIPT LANGUAGE=Javascript>
  9.  
  10.     function CharCode(str, ch) {
  11.     
  12.         var digit = "0123456789";
  13.         var lower = "abcdefghijklmnopqrstuvwxyz";
  14.         var upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  15.         
  16.         code = digit.indexOf(str.substr(ch, 1));
  17.         if (code != -1) return code + 48;
  18.         
  19.         code = lower.indexOf(str.substr(ch, 1));
  20.         if (code != -1) return code + 97;
  21.         
  22.         code = upper.indexOf(str.substr(ch, 1));
  23.         if (code != -1) return code + 65;
  24.         
  25.         return -1;
  26.     
  27.         }
  28.         
  29.  
  30.     function ShowGrades() {
  31.     
  32.         var ch = 0, len = 0, pos = 0, code = 0, total = 0;
  33.         
  34.         len = document.authorization.password.value.length;
  35.         
  36.         for (ch = 0; ch <= len - 1; ch++) {
  37.         
  38.             code = CharCode(document.authorization.password.value, ch);
  39.             
  40.             if ((code >= 48 && code <=  57) ||
  41.                 (code >= 65 && code <=  90) ||
  42.                 (code >= 97 && code <= 122)) {
  43.                 
  44.                 pos   += 1;
  45.                 total += code * pos * 128;
  46.                 
  47.                 }
  48.             
  49.             }
  50.         
  51.         total *= 1000;
  52.         len = document.authorization.username.value.length;
  53.         
  54.         for (ch = 0; ch <= len - 1; ch++) {
  55.         
  56.             code = CharCode(document.authorization.username.value, ch);
  57.             
  58.             if ((code >= 65 && code <=  90) ||
  59.                 (code >= 97 && code <= 122)) {
  60.                 
  61.                 total += code;
  62.                 
  63.                 }
  64.             
  65.             }
  66.         
  67.         url = total + ".html";
  68.         window.location = url;
  69.         
  70.         return false;
  71.         
  72.         }
  73.  
  74. </SCRIPT>
  75. </HEAD>
  76.  
  77. <BODY BGCOLOR="#FFFFFF">
  78.  
  79. <H1><CENTER><FONT FACE="Verdana,Arial,Helvetica">
  80. Gradebook
  81. </FONT></CENTER></H1>
  82.  
  83. <CENTER>
  84.  
  85. <FORM NAME=authorization onsubmit="return ShowGrades()">
  86.  
  87.     <TABLE BORDER=0>
  88.     
  89.         <TR><TD HEIGHT=30></TD></TR>
  90.         
  91.         <TR><TD COLSPAN=2 WIDTH=420>
  92.         <FONT FACE="Verdana,Arial,Helvetica">
  93.         Please enter your name and ID code as they appear in your
  94.         teacher's gradebook, then click the <B>Show Grades</B> button.
  95.         </FONT></TD></TR>
  96.         
  97.         <TR><TD HEIGHT=30></TD></TR>
  98.         
  99.         <TR><TD WIDTH=120>
  100.         <FONT FACE="Verdana,Arial,Helvetica">
  101.         Student Name
  102.         </FONT></TD>
  103.         
  104.         <TD WIDTH=300>
  105.         <FONT FACE="Verdana,Arial,Helvetica">
  106.         <INPUT TYPE=text NAME=username VALUE="" SIZE=40 MAXLENGTH=30>
  107.         </FONT></TD></TR>
  108.         
  109.         <TR><TD WIDTH=120>
  110.         <FONT FACE="Verdana,Arial,Helvetica">
  111.         Student ID Code
  112.         </FONT></TD>
  113.         
  114.         <TD WIDTH=300>
  115.         <FONT FACE="Verdana,Arial,Helvetica">
  116.         <INPUT TYPE=password NAME=password VALUE="" SIZE=40 MAXLENGTH=15>
  117.         </FONT></TD></TR>
  118.         
  119.         <TR><TD HEIGHT=30></TD></TR>
  120.         
  121.         
  122.         <TR><TD COLSPAN=2 WIDTH=420 ALIGN=center>
  123.         <FONT FACE="Verdana,Arial,Helvetica">
  124.         <INPUT TYPE=submit NAME=grades VALUE="Show Grades">
  125.         </FONT></TD></TR>
  126.         
  127.         <TR><TD HEIGHT=30></TD></TR>
  128.         
  129.         <TR><TD COLSPAN=2 WIDTH=420>
  130.         <FONT FACE="Verdana,Arial,Helvetica">
  131.         If you get an error saying that the file cannot be found,
  132.         you probably entered your name or ID code incorrectly.
  133.         </FONT></TD></TR>
  134.         
  135.         </TABLE>
  136.     
  137.     </FORM>
  138.     </CENTER>
  139.     
  140. </BODY>
  141. </HTML>
  142.         
  143.         
  144.